var zhu_option;
function zhuzhuang(chartname,xdata,ydata){
	zhu_option = {
		title : {
	        text: chartname,
	        x:'center'
	    },
	    tooltip : {
	        trigger: 'axis',
	        axisPointer : {            // 坐标轴指示器，坐标轴触发有效
	            type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
	        }
	    }, 
	    legend: {
	        data:['']
	    }, 
	    grid: {
	        left: '3%',
	        right: '4%',
	        bottom: '3%',
	        containLabel: true
	    },
	    xAxis : [
	        {
	            type : 'category',
	            axisLabel: {interval: 0},
	            data : xdata
	        }
	    ],
	    yAxis : [
	        {
	            type : 'value'
	        }
	    ],
	    series : [
	        {
	            name:chartname,
	            type:'bar',
	            data:ydata
	        }
	    ]
	};
}

var bing_option;
function bingtu(title,bing_dataAxis,bing_data){
	bing_option = {
	    title : {
	        text: title,
	        x:'center'
	    },
	    tooltip : {
	        trigger: 'item',
	        formatter: "{a} <br/>{b} : {c} ({d}%)"
	    },
	    legend: {
	        orient: 'vertical',
	        left: 'left',
	        data: bing_dataAxis
	    },
	    grid: [
	           {width: '80%', height: '80%'}
	    ],
	    series : [
	        {
	            name: '',
	            type: 'pie',
	            radius : '55%',
	            center: ['50%', '60%'],
	            data:bing_data,
	            itemStyle: {
	                emphasis: {
	                    shadowBlur: 10,
	                    shadowOffsetX: 0,
	                    shadowColor: 'rgba(0, 0, 0, 0.5)'
	                }
	            }
	        } 
	    ]
	};
}

var sandian_option;
function sandian(title,dataAll){
   var markLineOpt = {
       animation: false,
       label: {
           normal: {
               formatter: 'y = 0.5 * x + 3',
               textStyle: {
                   align: 'right'
               }
           }
       },
       lineStyle: {
           normal: {
               type: 'solid'
           }
       }
   };
   sandian_option = {
       title: {
           text: title,
           x: 'center',
           y: 0
       },
       grid: [
           {x: '10%', y: '10%', width: '80%', height: '80%'}
       ],
       tooltip: {
           formatter: 'Group {a}: ({c})'
       },
       xAxis: [
           {type: 'value',scale: true}
       ],
       yAxis: [
           {type: 'value',scale: true}
       ],
       series: [
           {
               name: 'I',
               type: 'scatter',
               xAxisIndex: 0,
               yAxisIndex: 0,
               data: dataAll[0],
               markLine: markLineOpt
           }
       ]
   };
}

var zhexian_option;
function zhexian(title,dataname,xdata,ydata){
	zhexian_option = {
	    title: {
	        text: title
	    },
	    tooltip : {
	        trigger: 'axis'
	    },
	    legend: {
	        data:dataname
	    },
	    toolbox: {
	        feature: {
	            saveAsImage: {}
	        }
	    },
	    grid: {
	        left: '3%',
	        right: '4%',
	        bottom: '3%',
	        containLabel: true
	    },
	    xAxis : [
	        {
	            type : 'category',
	            boundaryGap : false,
	            data : xdata,
	            axisLabel: {
	            	interval: 0,
	            }
	        }
	    ],
	    yAxis : [
	        {
	            type : 'value'
	        }
	    ],
	    series : [
   	        {
	            name:title,
	            type:'line',
	            stack: '总量',
	            areaStyle: {normal: {}},
	            data:ydata
	        }
	    ]
	};

}